<?php

/**
 * @author luhua
 */
class ProductModel extends Model {

    protected $_validate = array(
        array('name', 'require', '请输入产品名称'),
        array('thumb', 'require', '请上传产品图片')
    );
    public $_auto = array(
        array('create_at', 'nowDate', self::MODEL_INSERT, 'callback')
    );

    public function nowDate() {
        return date('Y-m-d H:i:s', time());
    }


}

?>
